<template>
  <div>
    <el-form ref="form" v-loading="loading" :model="form" :rules="rules" label-width="120px" class="dataForm" style="margin-left: 30px;">
      <el-row>
        <el-col :span="12">
          <el-form-item :label="$t('估值基准日期*')" prop="valuationDate">
            <el-date-picker
              v-model="form.valuationDate"
              clearable
              style="width: 200px"
              type="date"
              value-format="yyyy-MM-dd"
              :placeholder="$t('估值基准日期')"
            />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('期末总资产') + $t('(元)') + '*'" prop="endTotalAssets">
            <Money v-model="form.endTotalAssets" :placeholder="$t('期末总资产')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('期末净资产') + $t('(元)') + '*'" prop="endNetAssets">
            <Money v-model="form.endNetAssets" :placeholder="$t('期末净资产')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('产品成立以来累计管理费') + $t('(元)')" prop="managementFee">
            <Money v-model="form.managementFee" :placeholder="$t('产品成立以来累计管理费')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('产品成立以来累计已付管理费') + $t('(元)') + '*'" prop="paidManagementFee">
            <Money v-model="form.paidManagementFee" :placeholder="$t('产品成立以来累计已付管理费')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('产品成立以来累计投资顾问费') + $t('(元)') + '*'" prop="consultantFee">
            <Money v-model="form.consultantFee" :placeholder="$t('产品成立以来累计投资顾问费')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('产品成立以来累计已付投资顾问费') + $t('(元)') + '*'" prop="paidConsultantFee">
            <Money v-model="form.paidConsultantFee" :placeholder="$t('产品成立以来累计已付投资顾问费')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('产品成立以来累计托管费/保管费') + $t('(元)') + '*'" prop="custodyFee">
            <Money v-model="form.custodyFee" unit="" :placeholder="$t('产品成立以来累计托管费/保管费')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('产品成立以来累计已付托管费/保管费') + $t('(元)') + '*'" prop="paidCustodyFee">
            <Money v-model="form.paidCustodyFee" :placeholder="$t('产品成立以来累计已付托管费/保管费')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('产品成立以来累计运营服务费/外包服务费') + $t('(元)') + '*'" prop="outsourcingServiceFee">
            <Money v-model="form.outsourcingServiceFee" :placeholder="$t('产品成立以来累计运营服务费/外包服务费')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('产品成立以来累计已付运营服务费/外包服务费') + $t('(元)') + '*'" prop="paidOutsourcingServiceFee">
            <Money v-model="form.paidOutsourcingServiceFee" :placeholder="$t('产品成立以来累计已付运营服务费/外包服务费')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('产品成立以来累计业绩报酬') + $t('(元)') + '*'" prop="performancePay">
            <Money v-model="form.performancePay" :placeholder="$t('产品成立以来累计业绩报酬')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('产品成立以来累计已付业绩报酬') + $t('(元)') + '*'" prop="paidPerformancePay">
            <Money v-model="form.paidPerformancePay" :placeholder="$t('产品成立以来累计已付业绩报酬')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('产品成立以来累计其他费用') + $t('(元)')" prop="otherFee">
            <Money v-model="form.otherFee" :placeholder="$t('产品成立以来累计其他费用')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('产品成立以来累计分红') + $t('(元)') + '*'" prop="dividends">
            <Money v-model="form.dividends" :placeholder="$t('产品成立以来累计分红')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('产品成立以来累计本金、收益分配') + $t('(元)') + '*'" prop="principalAllocation">
            <Money v-model="form.principalAllocation" :placeholder="$t('产品成立以来累计本金、收益分配')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('基金初始募集面值') + $t('(元)')" prop="faceValue">
            <Money v-model="form.faceValue" :placeholder="$t('基金初始募集面值')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('报告期期末单位净值') + $t('(元)')" prop="netWorth">
            <Money v-model="form.netWorth" :placeholder="$t('报告期期末单位净值')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('报告期期末单位累计净值') + $t('(元)')" prop="cumulativeNetWorth">
            <Money v-model="form.cumulativeNetWorth" :placeholder="$t('报告期期末单位累计净值')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('报告期末劣后级单位净值') + $t('(元)')" prop="inferiorUnitsNetWorth">
            <Money v-model="form.inferiorUnitsNetWorth" :placeholder="$t('报告期末劣后级单位净值')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('现金类资产：银行存款') + $t('(元)')" prop="bankSavings">
            <Money v-model="form.bankSavings" :placeholder="$t('现金类资产：银行存款')" />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <div class="area-header">
            <span class="area-header-title">{{ $t('境内未上市、未挂牌公司股权投资') }}</span>
          </div>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('股权投资') + $t('(元)')" prop="equityInvestment">
            <Money v-model="form.equityInvestment" :placeholder="$t('股权投资')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('其中：优先股') + $t('(元)')" prop="preferredStock">
            <Money v-model="form.preferredStock" :placeholder="$t('其中：优先股')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('其他股权类投资') + $t('(元)')" prop="otherEquityInvestment">
            <Money v-model="form.otherEquityInvestment" :placeholder="$t('其他股权类投资')" />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <div class="area-header">
            <span class="area-header-title">{{ $t('上市公司定向增发投资') }}</span>
          </div>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('上市公司定向增发股票投资') + $t('(元)')" prop="additionalStockInvestment">
            <Money v-model="form.additionalStockInvestment" :placeholder="$t('上市公司定向增发股票投资')" />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <div class="area-header">
            <span class="area-header-title">{{ $t('新三板投资') }}</span>
          </div>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('新三板挂牌企业投资') + $t('(元)')" prop="businessInvestment">
            <Money v-model="form.businessInvestment" :placeholder="$t('新三板挂牌企业投资')" />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <div class="area-header">
            <span class="area-header-title">{{ $t('境内证券投资规模') }}</span>
          </div>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('结算备付金') + $t('(元)')" prop="provision">
            <Money v-model="form.provision" :placeholder="$t('结算备付金')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('存出保证金') + $t('(元)')" prop="margin">
            <Money v-model="form.margin" :placeholder="$t('存出保证金')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('股票投资') + $t('(元)')" prop="stockInvestment">
            <Money v-model="form.stockInvestment" :placeholder="$t('股票投资')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('债券投资') + $t('(元)')" prop="bondInvestment">
            <Money v-model="form.bondInvestment" :placeholder="$t('债券投资')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('其中：银行间市场债券') + $t('(元)')" prop="bankMarketBond">
            <Money v-model="form.bankMarketBond" :placeholder="$t('其中：银行间市场债券')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('其中：利率债') + $t('(元)')" prop="interestRateDebt">
            <Money v-model="form.interestRateDebt" :placeholder="$t('其中：利率债')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('其中：信用债') + $t('(元)')" prop="creditDebt">
            <Money v-model="form.creditDebt" :placeholder="$t('其中：信用债')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('资产支持证券') + $t('(元)')" prop="assetSecurities">
            <Money v-model="form.assetSecurities" :placeholder="$t('资产支持证券')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('基金投资（公募基金）') + $t('(元)')" prop="raisedFunds">
            <Money v-model="form.raisedFunds" :placeholder="$t('基金投资（公募基金）')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('其中：货币基金') + $t('(元)')" prop="monetaryFund">
            <Money v-model="form.monetaryFund" :placeholder="$t('其中：货币基金')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('期货、期权及其他衍生品投资') + $t('(元)')" prop="derivativesInvestment">
            <Money v-model="form.derivativesInvestment" :placeholder="$t('期货、期权及其他衍生品投资')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('其中：股指期货投资') + $t('(元)')" prop="stockIndex">
            <Money v-model="form.stockIndex" :placeholder="$t('其中：股指期货投资')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('其中：国债期货投资') + $t('(元)')" prop="nationalDebt">
            <Money v-model="form.nationalDebt" :placeholder="$t('其中：国债期货投资')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('其中：商品期货投资') + $t('(元)')" prop="commodity">
            <Money v-model="form.commodity" :placeholder="$t('其中：商品期货投资')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('其中：个股期权投资') + $t('(元)')" prop="individualStocks">
            <Money v-model="form.individualStocks" :placeholder="$t('其中：个股期权投资')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('期货及衍生品交易保证金') + $t('(元)')" prop="tradingMargin">
            <Money v-model="form.tradingMargin" :placeholder="$t('期货及衍生品交易保证金')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('买入返售金融资产') + $t('(元)')" prop="monetaryAssets">
            <Money v-model="form.monetaryAssets" :placeholder="$t('买入返售金融资产')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('其他证券类标的') + $t('(元)')" prop="securitiesSubjectMatter">
            <Money v-model="form.securitiesSubjectMatter" :placeholder="$t('其他证券类标的')" />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <div class="area-header">
            <span class="area-header-title">{{ $t('资管计划投资') }}</span>
          </div>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('商业银行理财产品投资') + $t('(元)')" prop="productInvestment">
            <el-input v-model="form.productInvestment" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" :placeholder="$t('商业银行理财产品投资')" show-word-limit maxlength="1000" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('信托计划投资') + $t('(元)')" prop="trustPlanInvestment">
            <el-input v-model="form.trustPlanInvestment" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" :placeholder="$t('信托计划投资')" show-word-limit maxlength="1000" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('基金公司及其子公司资产管理计划投资') + $t('(元)')" prop="fundCompany">
            <el-input v-model="form.fundCompany" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" :placeholder="$t('基金公司及其子公司资产管理计划投资')" show-word-limit maxlength="1000" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('保险资产管理计划投资') + $t('(元)')" prop="insurance">
            <el-input v-model="form.insurance" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" :placeholder="$t('保险资产管理计划投资')" show-word-limit maxlength="1000" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('证券公司及其子公司资产管理计划投资') + $t('(元)')" prop="securitiesCompany">
            <el-input v-model="form.securitiesCompany" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" :placeholder="$t('证券公司及其子公司资产管理计划投资')" show-word-limit maxlength="1000" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('期货公司及其子公司资产管理计划投资') + $t('(元)')" prop="futuresCompany">
            <el-input v-model="form.futuresCompany" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" :placeholder="$t('期货公司及其子公司资产管理计划投资')" show-word-limit maxlength="1000" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('私募基金产品投资') + $t('(元)')" prop="privateEquity">
            <el-input v-model="form.privateEquity" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" :placeholder="$t('私募基金产品投资')" show-word-limit maxlength="1000" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('未在协会备案的合伙企业份额') + $t('(元)')" prop="partnershipShare">
            <el-input v-model="form.partnershipShare" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" :placeholder="$t('未在协会备案的合伙企业份额')" show-word-limit maxlength="1000" />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <div class="area-header">
            <span class="area-header-title">{{ $t('另类投资') }}</span>
          </div>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('另类投资') + $t('(元)')" prop="alternativeInvestments">
            <Money v-model="form.alternativeInvestments" :placeholder="$t('另类投资')" />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <div class="area-header">
            <span class="area-header-title">{{ $t('境内债权类投资') }}</span>
          </div>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('银行委托贷款规模') + $t('(元)')" prop="bankEntrustedLoanScale">
            <Money v-model="form.bankEntrustedLoanScale" :placeholder="$t('银行委托贷款规模')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('信托贷款') + $t('(元)')" prop="trustLoan">
            <Money v-model="form.trustLoan" :placeholder="$t('信托贷款')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('应收账款投资') + $t('(元)')" prop="accountsReceivableInvestment">
            <Money v-model="form.accountsReceivableInvestment" :placeholder="$t('应收账款投资')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('各类受（收）益权投资') + $t('(元)')" prop="incomeRightInvestment">
            <Money v-model="form.incomeRightInvestment" :placeholder="$t('各类受（收）益权投资')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('票据（承兑汇票等）投资') + $t('(元)')" prop="billInvestment">
            <Money v-model="form.billInvestment" :placeholder="$t('票据（承兑汇票等）投资')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('其他债权投资') + $t('(元)')" prop="otherDebtInvestment">
            <Money v-model="form.otherDebtInvestment" :placeholder="$t('其他债权投资')" />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <div class="area-header">
            <span class="area-header-title">{{ $t('境外投资') }}</span>
          </div>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('境外投资') + $t('(元)')" prop="overseasInvestment">
            <Money v-model="form.overseasInvestment" :placeholder="$t('境外投资')" />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <div class="area-header">
            <span class="area-header-title">{{ $t('其他资产') }}</span>
          </div>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('其他资产') + $t('(元)')" prop="otherAssets">
            <Money v-model="form.otherAssets" :placeholder="$t('其他资产')" />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <div class="area-header">
            <span class="area-header-title">{{ $t('基金负债情况') }}</span>
          </div>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('债券回购总额') + $t('(元)')" prop="totalBondRepurchase">
            <Money v-model="form.totalBondRepurchase" :placeholder="$t('债券回购总额')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('融资、融券总额') + $t('(元)')" prop="totalFinancing">
            <Money v-model="form.totalFinancing" :placeholder="$t('融资、融券总额')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('其中：融券总额') + $t('(元)')" prop="totalSecuritiesFinancing">
            <Money v-model="form.totalSecuritiesFinancing" :placeholder="$t('其中：融券总额')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('银行借款总额') + $t('(元)')" prop="totalBankBorrowings">
            <Money v-model="form.totalBankBorrowings" :placeholder="$t('银行借款总额')" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('其他融资总额') + $t('(元)')" prop="totalOtherFinancing">
            <Money v-model="form.totalOtherFinancing" :placeholder="$t('其他融资总额')" />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <div class="area-header">
            <span class="area-header-title">{{ $t('账户信息') }}</span>
          </div>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('中登公司证券账户：一码通账户')" prop="oneCodeAccount">
            <el-input v-model="form.oneCodeAccount" :placeholder="$t('中登公司证券账户：一码通账户')" show-word-limit maxlength="100" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('期货保证金监控中心账户：统一开户编码')" prop="unifiedAccountOpeningCode">
            <el-input v-model="form.unifiedAccountOpeningCode" :placeholder="$t('期货保证金监控中心账户：统一开户编码')" show-word-limit maxlength="100" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('银行间债券市场：中债登债券账户')" prop="chinaBondBondAccount">
            <el-input v-model="form.chinaBondBondAccount" :placeholder="$t('银行间债券市场：中债登债券账户')" show-word-limit maxlength="100" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item :label="$t('银行间债券市场：上清所债券账户')" prop="supernatantBondAccountsAccount">
            <el-input v-model="form.supernatantBondAccountsAccount" :placeholder="$t('银行间债券市场：上清所债券账户')" show-word-limit maxlength="100" />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <div class="area-header">
            <span class="area-header-title">{{ $t('其他') }}</span>
          </div>
        </el-col>
        <el-col :span="24">
          <el-form-item :label="$t('管理人认为需要说明的其他问题')" prop="otherProblems">
            <el-input v-model="form.otherProblems" type="textarea" :placeholder="$t('管理人认为需要说明的其他问题')" :autosize="{ minRows: 4, maxRows: 5}" show-word-limit maxlength="2000" />
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <div slot="footer" class="dialog-footer" style="text-align: right;">
      <!--保存 取消按钮-->
      <save-btn v-if="!btnHide && processBtn" :cancel-show="cancelShow" has-permi="fund:monitor" />
    </div>
  </div>
</template>

<script>
    import { saveFundProductIndicator, getByMonitorId, getDefaultData } from '@/api/fund/operation/fundProductIndicator'
    export default {
        data() {
            return {
                // 表单参数
                form: {},
                // 遮罩层
                loading: false,
                monitorId: undefined,
                // 表单校验
                rules: {},
                processBtn: true,
                // 取消按钮是否展示
                cancelShow: true,
                btnHide: false
            }
        },
        created() {
        },
        methods: {
            // 初始化数据
            init(data) {
              this.loading = true
              this.processBtn = data.processBtn
              this.cancelShow = data.cancelShow
              this.btnHide = data.btnHide
              getByMonitorId(data.id).then(response => {
                if (response.data) {
                  this.form = response.data
                  this.loading = false
                } else {
                  getDefaultData(data.fundId).then(response => {
                    this.reset()
                    this.form = response.data
                    this.form.monitorId = data.id
                    this.loading = false
                  })
                }
              })
            },
            // 表单重置
            reset() {
                this.form = {
                    id: undefined,
                    monitorId: undefined,
                    valuationDate: undefined,
                    endTotalAssets: undefined,
                    endNetAssets: undefined,
                    managementFee: undefined,
                    paidManagementFee: undefined,
                    consultantFee: undefined,
                    paidConsultantFee: undefined,
                    paidCustodyFee: undefined,
                    outsourcingServiceFee: undefined,
                    paidOutsourcingServiceFee: undefined,
                    performancePay: undefined,
                    paidPerformancePay: undefined,
                    otherFee: undefined,
                    dividends: undefined,
                    principalAllocation: undefined,
                    faceValue: undefined,
                    netWorth: undefined,
                    cumulativeNetWorth: undefined,
                    inferiorUnitsNetWorth: undefined,
                    bankSavings: undefined,
                    equityInvestment: undefined,
                    preferredStock: undefined,
                    otherEquityInvestment: undefined,
                    additionalStockInvestment: undefined,
                    businessInvestment: undefined,
                    provision: undefined,
                    margin: undefined,
                    stockInvestment: undefined,
                    bondInvestment: undefined,
                    bankMarketBond: undefined,
                    interestRateDebt: undefined,
                    creditDebt: undefined,
                    assetSecurities: undefined,
                    raisedFunds: undefined,
                    monetaryFund: undefined,
                    derivativesInvestment: undefined,
                    stockIndex: undefined,
                    nationalDebt: undefined,
                    commodity: undefined,
                    individualStocks: undefined,
                    tradingMargin: undefined,
                    securitiesSubjectMatter: undefined,
                    productInvestment: undefined,
                    trustPlanInvestment: undefined,
                    fundCompany: undefined,
                    insurance: undefined,
                    securitiesCompany: undefined,
                    futuresCompany: undefined,
                    privateEquity: undefined,
                    partnershipShare: undefined,
                    alternativeInvestments: undefined,
                    bankEntrustedLoanScale: undefined,
                    trustLoan: undefined,
                    accountsReceivableInvestment: undefined,
                    incomeRightInvestment: undefined,
                    billInvestment: undefined,
                    otherDebtInvestment: undefined,
                    overseasInvestment: undefined,
                    otherAssets: undefined,
                    totalBondRepurchase: undefined,
                    totalFinancing: undefined,
                    totalSecuritiesFinancing: undefined,
                    totalBankBorrowings: undefined,
                    totalOtherFinancing: undefined,
                    oneCodeAccount: undefined,
                    unifiedAccountOpeningCode: undefined,
                    chinaBondBondAccount: undefined,
                    supernatantBondAccountsAccount: undefined,
                    otherProblems: undefined,
                    createBy: undefined,
                    createTime: undefined,
                    updateBy: undefined,
                    updateTime: undefined
                }
                this.resetForm('form')
            },
            // 取消按钮
            cancel() {
              this.reset()
              this.$parent.$parent.$parent.$parent.indicatorFormOpen = false
              this.$emit('cancel', undefined)
            },
            // 关闭form页面
            closeForm() {
                // 关闭form页面遮罩层
                this.loading = false
                // 关闭form页面
                if (this.$parent.$parent.$parent.$parent.indicatorFormOpen !== undefined) {
                  this.$parent.$parent.$parent.$parent.indicatorFormOpen = false
                }
                this.$emit('cancel', undefined)
            },
            /** 提交按钮 */
            submitForm() {
                this.$refs['form'].validate(valid => {
                    if (valid) {
                        this.loading = true
                        saveFundProductIndicator(this.form).then(response => {
                            if (response.code === 200) {
                                this.msgSuccess(this.$t('保存成功'))
                            } else {
                                this.msgError(response.msg)
                            }
                            this.loading = false
                        })
                    } else {
                       this.locationError(document)
                    }
                })
           }

        }

    }
</script>
